<?php

include ('../Classe/Function_SQL.php');

$Connect =new Connector_Sql();
$Connect->connect();
 //si les informations ont été envoyé
$login = $_POST['login']; //Parsing du login 
$password = $_POST['pass']; //parsing du password 

if( ( strlen($login)!=0) && (strlen($password)!=0))  { 
	$session = $Connect->auth_admin($login,$password);
	$Connect->deconnect();
    if ($session == 1) {//si il existe des resultats à la requête
        session_start(); // ON LANCE LA SESSION
	echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>NUMERIPLUS_BACKUP_ADMIN_PORTAL</title> <script type="text/javascript" language="javascript" src="com.ABC.ABC_BACKUP_ADMIN_PORTAL.nocache.js"></script> </head> <body> <iframe src="javascript:\'\'" id="__gwt_historyFrame" tabIndex="-1 " style="position:absolute;width:0;height:0;border:0"></iframe> </body> </html>';
     $_SESSION["m_login"] = $login; // on inscrit la variable $login en variable de session
 
 
    } else echo 'identifiant ou mot de passe incorrect';
} else echo 'identifiant ou mot de passe incorrect';

?>

